let order = ['论坛','微信','微博']
let tableData=[{name:'微博',source:'weibo'},{name:'微信',source:'weixin'},{name:'论坛',source:'luntan'}]
tableData = tableData.sort((a, b) => {
return order.indexOf(a.name) - order.indexOf(b.name)
})
console.log(tableData)